home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Geek Games #12
/
GEGA012.iso
/
Jogos de Azar
/
1721-apuesten.swf
/
scripts
/
C_ChipsMenuCLASS.as
< prev
next >
Wrap
Text File
|
2006-01-17
|
1KB
|
55 lines
_global.C_ChipsMenuCLASS = function()
{
};
C_ChipsMenuCLASS.prototype = new MovieClip();
C_ChipsMenuCLASS.prototype.onLoad = function()
{
this.chips = [1,5,25,100];
this.buttons = [];
var chips_names = ["$1.00","$5.00","$25.00","$100.00"];
var c;
var i = 0;
while(i < this.chips.length)
{
c = this["ch_" + this.chips[i] + "_mc"];
c.chip = this.chips[i];
c.addAlt("Use " + chips_names[i] + " chips for betting");
c.onPress = function()
{
this.hideAlt();
this._parent.setChip(this.chip);
};
c.useHandCursor = false;
this.buttons.push(c);
i++;
}
this.setChip(this.curBet);
};
C_ChipsMenuCLASS.prototype.setChip = function(chip)
{
var i = 0;
while(i < this.buttons.length)
{
this.buttons[i]._xscale = this.buttons[i]._yscale = 100;
i++;
}
var c = this["ch_" + chip + "_mc"];
c._xscale = c._yscale = 120;
this.curBet = chip;
this.ch_arow._x = c._x;
this.client.client[this.client.handler](this.curBet);
};
C_ChipsMenuCLASS.prototype.setChangeHandler = function(client)
{
if(arguments.length == 1)
{
this.client = client;
}
else
{
this.client = {client:arguments[1],handler:arguments[0]};
}
};
ASSetPropFlags(_global,"C_ChipsMenuCLASS",131);
Object.registerClass("C_ChipsMenuCLASS",C_ChipsMenuCLASS);